﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using simpleHotel.Business;

namespace simpleHotel.Web
{
    public partial class HotelPrice : System.Web.UI.Page
    {
        protected double normal = 0;
        protected double weekend=0;
        protected double holiday = 0;

        protected double normalcompany = 0;
        protected double weekendcompany = 0;
        protected double holidaycompany = 0;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.Params["hid"] != null && Request.Params["rid"] != null)
                {
                    int hid = Int32.Parse(Request.Params["hid"]+"");
                    int rid = Int32.Parse(Request.Params["rid"] + "");
                    HotelBLL obj = new HotelBLL();
                    DataTable tb = new DataTable();
                    tb = obj.GetHotelRoomPrice(hid,rid);
                    foreach (DataRow dr in tb.Rows)
                    {
                        normal = Convert.ToDouble(dr["Normal"]+"");
                        weekend = Convert.ToDouble(dr["Weekend"] + "");
                        holiday = Convert.ToDouble(dr["Holiday"] + "");

                        normalcompany = Convert.ToDouble(dr["NormalCompany"] + "");
                        weekendcompany = Convert.ToDouble(dr["WeekendCompany"] + "");
                        holidaycompany = Convert.ToDouble(dr["HolidayCompany"] + "");
                    }
                }
            }
        }
    }
}